﻿#pragma once
#include "../SocketClient.h"
#include <string>

namespace protocol{
    class TCPClient: public SocketClient
    {
    private:

    protected:
        virtual int32_t writeData(uint8_t* avBuf, uint32_t avBuflength) override;
        virtual int32_t readData(uint8_t* avBuf, uint32_t avBuflength) override;
        virtual int connectToServer() override;
        virtual void disConnect() override;
    public:
        TCPClient(const std::string avHost, const uint16_t avPort);
        void setConnectTimeout(uint8_t avsec);
    };
}